<template>
  <div class="products">
    <BsSubmenu :subMenus="subMenus" />
     <section class="banner">
      <div class="text-center f24">
        资讯中心
      </div>
    </section>
    <section class="news hd">
      <Row :gutter="40">
        <Col span="12" >
          <div class="img-wrap">
             <img src="../assets/images/about/WX20190603-221411@2x.png" width="100%" alt="">
          </div>
           <div class="mt20 text-wrapper">
             云在房贷首付沈德符第三方收到否反倒是
           </div>
           <ul class="list">
             <li class="clearfix" v-for="i in 4">
               <span>发生的范德萨范德萨范德萨范德萨发</span>
               <span class="fr c3">2019-09-08</span>
             </li>
           </ul>
        </Col>
        <Col span="12">
          <div class="img-wrap">
             <img src="../assets/images/about/WX20190603-221411@2x.png" width="100%" alt="">
          </div>
           <div class="mt20 text-wrapper">
             云在房贷首付沈德符第三方收到否反倒是
           </div>
           <ul class="list">
             <li class="clearfix" v-for="i in 4">
               <span>发生的范德萨范德萨范德萨范德萨发</span>
               <span class="fr c3">2019-09-08</span>
             </li>
           </ul>
        </Col>
      </Row>
    </section>
  </div>

</template>

<script>
import BsSubmenu from '@/components/BsSubmenu'

export default {
  components: {BsSubmenu},
  data (){
    return {
      subMenus: [
        {title: '公司资讯', link:'/news', active: true, type:'1'},
        {title: '行业资讯', link:'/news?type=2', active: false, type:'2'}
      ]
    }
  },
  beforeRouteUpdate (to, from, next){
    let type = to.query.type || '1'
    this.subMenus.forEach(v => {
      v.active = (type == v.type)
    })
    next()
  }
}
</script>

<style lang="less" scoped>
.banner{
  background: url(../assets/images/supports/bann.png) no-repeat center center;
  height: 210px;
  color: #fff;
  line-height: 210px;
}
.news{
  padding: 40px 0;
}
.text-wrapper{
  padding-bottom: 20px;
  border-bottom:1px dashed #f2f2f2;
}
.list{
  li{
    padding: 16px 0;
  }
}
</style>
